/**
 * Created by spatra on 14-10-7.
 */

define(['jquery'], function($){

  /**
   * 高亮侧边导航栏
   */
  var highLightSlider = function(){
    var $sliderUl = $('.user-setting-slider ul');
    var currentUrl = window.location.href;

    $sliderUl.find('li').each(function(){
      var $selfA = $(this).find('a');
      var self_url = $selfA.attr('href');

      if( self_url == currentUrl ){
        $selfA.addClass('active');
      }
    });
  };

  return {
    run: function(){
      highLightSlider();
    }
  };
});